using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using SkiaSharp;

namespace FlowChartV2.Libraries
{
    public abstract class Figure
    {
        public Point start { get; set; }
        public Size size { get; set; }
        public virtual FigureTypes type { get; set; }
        public virtual Point center { get; set; }
        public Point top { get; set; }
        public Point bottom { get; set; }
        public Point left { get; set; }
        public Point right { get; set; }
        public string text { get; set; }
        public int tsize { get; set; }
        public int hfont = 8;
        public virtual void Draw(ref SKCanvas canvas, SKPaint paint) { }
        public virtual void DrawText(ref SKCanvas canvas, SKPaint paint) { }
        public void DrawPoints(ref SKCanvas canvas, SKPaint paint)
        {
            paint.StrokeWidth = 2;
            paint.Color = SKColors.Red;
            canvas.DrawPoint(top.getPoint(), paint);
            paint.Color = SKColors.Brown;
            canvas.DrawPoint(bottom.getPoint(), paint);
            paint.Color = SKColors.Green;
            canvas.DrawPoint(left.getPoint(), paint);
            paint.Color = SKColors.Yellow;
            canvas.DrawPoint(right.getPoint(), paint);
            paint.Color = SKColors.Black;
            canvas.DrawPoint(center.getPoint(), paint);
        }
        public Figure(FigureTypes type, string text)
        {
            this.type = type;
            this.text = text;
        }
        public Figure()
        {
            
        }
    }
    public enum FigureTypes
    {
        RoundRect = 1,
        Triangle = 2,
        Rectengle = 3,
        Rhombus = 4,
        Hexagon = 5,
        Line = 6,
        CurvRect = 7,
    }
}